﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;

namespace SanJ.FreeCare.Patients
{
    public class Patient : AuditedAggregateRoot<Guid>, IMultiTenant, ISoftDelete
    {
        
        /// <summary>
        /// 第三方/HIS中患者编码
        /// </summary>
        public string ThirdId { get; set; }

        /// <summary>
        /// 有效性
        /// </summary>
        public string IsVaild { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// male | female | other | unknown
        /// </summary>
        public string GenderCode { get; set; }

        /// <summary>
        /// The date of birth for the individual
        /// </summary>
        public DateTime? BirthDate { get; set; }

        /// <summary>
        /// 身份证号
        /// </summary>
        public string IdenNo { get; set; }

        /// <summary>
        /// Marital (civil) status of a patient 婚姻状态
        /// </summary>
        public string MaritalStatusCode { get; set; }
        /// <summary>
        /// 电话
        /// </summary>
        public string Telecom { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        public string Address { get; set; }
        /// <summary>
        /// 民族
        /// </summary>
        public string Nationality { get; set; }

        /// <summary>
        /// 联系人
        /// </summary>
        public string Contact { get; set; }

        /// <summary>
        /// 联系人电话
        /// </summary>
        public string ContactTelecom { get; set; }

        /// <summary>
        /// 联系人电话
        /// </summary>
        public string ContactAddress { get; set; }

        /// <summary>
        /// 医疗证号
        /// </summary>
        public string MCardNo { get; set; }

        /// <summary>
        /// 机构
        /// </summary>
        public string OrganizationId { get; set; }

        /// <summary>
        /// 血型
        /// </summary>
        public string BloodType { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Note { get; set; }

        public Guid? TenantId { get; set; }

        public bool IsDeleted { get; set; }


        public Patient() { }

        public Patient(string thirdId, string isVaild, string name, string genderCode, DateTime birthDate, string idenNo, string maritalStatusCode, string telecom, string address, string nationality, string contact, string contactTelecom, string contactAddress, string mCardNo, string organizationId,string bloodType, string note
            )
        {
            this.Id = new Guid();
            this.ThirdId = thirdId;
            this.IsVaild = isVaild;
            this.Name = name;
            this.GenderCode = genderCode;
            this.BirthDate = birthDate;
            this.IdenNo = idenNo;
            this.MaritalStatusCode = maritalStatusCode;
            this.Telecom = telecom;
            this.Address = address;
            this.Nationality = nationality;
            this.Contact = contact;
            this.ContactTelecom = contactTelecom;
            this.ContactAddress = contactAddress;
            this.MCardNo = mCardNo;
            this.OrganizationId = organizationId;
            this.Note = note;
            this.BloodType= bloodType;
        }

    }
}
